package www.wen.com.common.lib.extension

import android.widget.EditText
import android.widget.TextView
import www.wen.com.common.R

/**
 * @author WEN
 * @Description: TextView 的扩展类
 * @date 2021/7/1 19:26
 */


/**
 * 获取文字
 */
fun EditText.trimProxy():String =  text.toString().trim()

/**
 * 获取文字
 */
fun TextView.enableTextColor(enable:Boolean, enableColor:Int = R.color.colorF04846, forbiddenColor:Int = R.color.color5F6065){
    isEnabled = enable
    setTextColor(if(enable) getColorAgency(enableColor) else getColorAgency(forbiddenColor))
}